package com.ly.learn.util;

import lombok.Data;

/**
 * @Author LY
 * @create 2023/12/21 14:01
 * @Description 返回结果工具类
 */
@Data
public class ResultData {

    /**响应编码*/
    private Integer code = 200;
    /**响应结果内容*/
    private String message = "操作成功";
    /**返回内容*/
    private Object data;

    public ResultData(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public ResultData(Integer code, String message, Object data){
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResultData(Object data){
        this.data = data;
    }
}
